# coding:UTF-8
# 在python中，一般定义函数名get_什么什么来获取私有属性名，定义set__什么什么来修改私有属性名
class Cookermaster(object):
    def __init__(self):
        self.kongfu = '【最厉害的功夫美食家】'

    def make_cake(self):
        print(f'{self.kongfu}制作美食')

class People(object):
    def __init__(self):
        self.kongfu = '【美食制作升级】'

    def make_cake(self):
        print(f'{self.kongfu}制作美食升级')

class Stu(People,Cookermaster):
    def __init__(self):
        self.kongfu = '【学徒自己的美食】'
        self.__money = 200000

    # 获取私有属性
    def get_money(self):
        return self.__money
    # 修改私有属性
    def set_money(self):
        self.__money = 9000

"""   def __info_print(self):
        print(self.kongfu)
        print(self.__money)

    def make_cake(self):
        self.__init__()
        print(f'{self.kongfu}制作美食')

    def make_cookermaster_cake(self):
        Cookermaster.__init__(self)
        Cookermaster.make_cake(self)
        
    def make_people_cake(self):
        People.__init__(self)
        People.make_cake(self)     """

class Son(Stu):
    pass

if __name__ == '__main__':
    stu = Stu
    xiaoming = Son()
    # 调用get_money函数获取私有属性money的值
    print(xiaoming.get_money())
    # 调用set_money函数设置私有属性money的值
    xiaoming.set_money()
    print(xiaoming.get_money())

